#define compilers
LD = ld
CC = gcc

#define compile flags
CFLAGS   = -g -Wall -ftest-coverage -fprofile-arcs 

#define compile pattern
%.o:%.c
	$(CC) $(CFLAGS) -c -o $@ $<

#define objects
OBJS = arith.o cpu.o decode.o flag.o grp.o io.o jmp.o \
	   logic.o main.o move.o stack.o string.o sys.o table.o test.o

all: simulator 

.PHONY: clean

simulator:$(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS)

clean:
	rm -rf system $(OBJS) *.gcno

